#!/bin/bash

read -p "Please enter the user name to join the docker group:" USERNAME

if [ -z "$USERNAME" ]; then
    echo "User name cannot be empty!"
    exit 1
fi

sudo groupadd docker

sudo gpasswd -a $USERNAME docker

newgrp docker
